/*
 * Copyright (c) 2009, Jan Pastor. All Rights Reserved.
 */

package sk.jp.commons.exception;

import java.util.LinkedHashMap;

/**
 * I18n support for excpetions.
 * <p>
 * For exception which implements this interface can be associated code of i18n
 * message (used for selection with locale) and a map of parameters, which can
 * be substituted to message.
 * 
 * @author Jan Pastor 
 */
public interface I18nSupportable {

    /**
     * Returns i18n message code, which may be translated to i18n message.
     * @return i18n message code, or null if not specified.
     */
    public String getCode();

    /**
     * Returns ordered map of i18n message parameters.
     * <p>
     * Map contains: key: param_key, value: param_value.
     * @return map of message parameters, or empty map but never null.
     */
    public LinkedHashMap<String, Object> getParams();

}
